<div class="box" id="story_box">
  <div id="story_holder">
    <%= form_with model: @story do |f| %>
      <%= render :partial => "stories/form", :locals => { :story => @story, :f => f } %>

      <p></p>

      <div class="box">
        <div class="boxline actions">
          <%= render :partial => "global/markdownhelp",
            :locals => { allow_images: @story.can_have_images? } %>

          <%= f.submit "Submit" %>

          &nbsp;
          <%= f.submit "Preview", class: 'story-preview', name: 'preview' %>
        </div>
      </div>
    <% end %>
  </div>
</div>

<div id="story_preview">
  <% if @story.previewing && @story.errors.empty? %>
    <%= render :template => "stories/show" %>
  <% end %>
</div>
